//获取url路径
function getRootHome() {
	return "http://localhost:8888";
}
function init(){
    var rootPath= getRootHome();
    $("<link>").attr({
		rel : "stylesheet",
		type : "text/css",
		href : rootPath+"/account/manager/js/commonHead/adminHead.css"
    }).appendTo("head");
    //添加元素
    var html = `
    <div class="admintab">
    <ul>
        <li>
            <a href="https://account.adream.org/account/manager" target='_blank'>统一账户</a>
        </li>
        <li>
            <a href="https://task.adream.org/manager" target='_blank'>任务管理</a>
        </li>
        <li>
            <a href="https://coursecenter.adream.org/admin" target='_blank'>课程管理</a>
        </li>
        <li>
            <a href="https://www.adreambox.net/activity/msystem" target='_blank'>活动管理</a>
        </li>
        <li>
            <a href="https://wenku.adream.org/admin" target='_blank'>梦想文库</a>
        </li>
        <li>
            <a href="https://huodui.adream.org/scfireManage" target='_blank'>火堆公益</a>
        </li>
    </ul>
</div>
    `;
    $('.admintabInit').append(html);
//    var URL = 'https://task.adream.org/manager';
     var URL = location.origin;
	//根据域名来定位是哪个项目
	$(".admintab ul li a").each(function(){
		let s = $(this).attr("href");
		if(s.indexOf(URL) != -1){
			$(this).addClass('selected')
		}
	}) 
}